<!-- #region setup -->
<script lang="ts" setup>
import {BytTableAction} from '@byt/components';
const createActionBtn = (row) => {
  return [
    {
      //按钮权限code
      canCode: "bms-ammeter-edit",
      //按钮名称长度 默认2
      eleBtnNameLength: 2,
      // 是否显示
      showRule: () => row.enableRecharge,
      //按钮
      ele: (
        <n-button
          text
          type="primary"
          onClick={() => {
            handleEdit(row);
          }}
        >
          编辑
        </n-button>
      ),
    },
  ];
}
const columns = [
  {
    title: "操作",
    key: "action",
    fixed: "right",
    render: (row) => {
      return BytTableAction(createActionBtn(row));
    },
  },
]
</script>
<!-- #endregion setup -->

